package com.homework2;

import java.util.Iterator;
import java.util.LinkedList;

public class Test03 {
    public static void main(String[] args) {
        String[] strs = {"12345","67891","2347809933","98765432102","67891","12347809933"};
        LinkedList<String> linkedList = new LinkedList<>();
        for (String str : strs) {
            if(!linkedList.contains(str)){
                linkedList.add(str);
            }
        }
        for (String s : linkedList) {
            System.out.println(s);
        }
        Iterator<String> iterator = linkedList.iterator();
        while (iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next);
        }
    }
}
